home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
pcboard
/
scall121.zip
/
SAMCALL.PPE
(
.txt
)
< prev
next >
Wrap
PCBoard Programming Language Executable
|
1994-05-29
|
10KB
|
494 lines
;------------------------------------------------------------------------------
; .ss.
; `²²'
; .,sS$Ss,,s$ .,sS$$$Ss. .,sS$Ss,,s$ .ss. .sSs.
; .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
; $$$' .$$$' $$$²Sçsµ²' .$$$' .$$$'.$$$' .$$$' `$$b.
; $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$' ;$$$
; `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
; .sS²°$$$²²°"' d²°'
; .$$² .$$'
; $$$.,d$$'
; `²S$$S²'
;------------------------------------------------------------------------------
; P.P.L.X. 2.OO (C)1996 - Lone Runner / AEGiS CoRP'96
;------------------------------------------------------------------------------
; PPE 1.OO (plain) - Analysis ON - Postprocessing ON
;------------------------------------------------------------------------------
Boolean BOOLEAN001
Boolean BOOLEAN002
Boolean BOOLEAN003
Integer INTEGER001
Integer INTEGER002
String STRING001
String STRING002
String STRING003
String TSTRING004(2)
String TSTRING005(5)
String TSTRING006(9)
String STRING007
String TSTRING008(12)
String STRING009
String STRING010
;------------------------------------------------------------------------------
STRING010 = "@X0F───────────────────────────────────────────────────────────────────@X07"
STRING002 = " "
STRING007 = "@X0E(@X0C@MINLEFT@ left@X0E) H)elp, Callsign, M)essage or ENTER = Quit"
STRING009 = Year(Date())
STRING003 = "SamCall " + Chr(67) + Chr(111) + Chr(112) + Chr(121) + Chr(114) + Chr(105) + Chr(103) + Chr(104) + Chr(116) + Chr(32) + Chr(49) + Chr(57) + Chr(57) + Chr(51) + Chr(45) + STRING009 + Chr(32) + Chr(98) + Chr(121) + Chr(32) + Chr(66) + Chr(105) + Chr(108) + Chr(108) + Chr(32) + Chr(83) + Chr(104) + Chr(114) + Chr(121) + Chr(111) + Chr(99) + Chr(107) + Chr(44) + Chr(32) + Chr(87) + Chr(68) + Chr(48) + Chr(71) + Chr(82) + Chr(67)
BOOLEAN002 = 0
BOOLEAN003 = 0
TSTRING004(1) = " SamCall Version 1.21 "
TSTRING004(2) = "Version 1.21"
If (Exist(PPEPath() + "SAMCALL.CFG")) Then
TSTRING005(1) = Trim(ReadLine(PPEPath() + "SAMCALL.CFG", 1), " ")
TSTRING005(2) = Trim(ReadLine(PPEPath() + "SAMCALL.CFG", 2), " ")
TSTRING005(3) = Trim(ReadLine(PPEPath() + "SAMCALL.CFG", 3), " ")
TSTRING005(4) = Trim(ReadLine(PPEPath() + "SAMCALL.CFG", 4), " ")
TSTRING005(5) = Trim(ReadLine(PPEPath() + "SAMCALL.CFG", 5), " ")
INTEGER002 = 1
For INTEGER001 = 1 To Len(TSTRING005(4))
INTEGER002 = Abs(INTEGER002 + Asc(Mid(TSTRING005(4), INTEGER001, 1)))
INTEGER002 = Abs(INTEGER002 + And(INTEGER001, Asc(Mid(TSTRING005(4), INTEGER001, 1))))
INTEGER002 = Abs(INTEGER002 + XOr(INTEGER001, Asc(Mid(TSTRING005(4), INTEGER001, 1))))
Next
INTEGER002 = Abs(INTEGER002 * XOr(24, Asc(Left(TSTRING005(4), 1))))
INTEGER002 = INTEGER002 + 183630
If (INTEGER002 == S2I(TSTRING005(5), 10)) Then
INTEGER002 = 1
Else
INTEGER002 = 0
Endif
If (INTEGER002) Then
STRING001 = "Registered to: " + TSTRING005(4)
Else
STRING001 = Chr(85) + Chr(110) + Chr(45) + Chr(82) + Chr(101) + Chr(103) + Chr(105) + Chr(115) + Chr(116) + Chr(101) + Chr(114) + Chr(101) + Chr(100) + Chr(32) + Chr(69) + Chr(118) + Chr(97) + Chr(108) + Chr(117) + Chr(97) + Chr(116) + Chr(105) + Chr(111) + Chr(110) + Chr(32) + Chr(67) + Chr(111) + Chr(112) + Chr(121) + Chr(46)
Endif
Else
Cls
AnsiPos 1, 10
PrintLn "Please Notify the Sysop..."
PrintLn "Unable to locate SAMCALL.CFG file in " + PPEPath()
AnsiPos 1, 15
Wait
Stop
Endif
If (Exist(TempPath() + "OUTFILE.$$$")) Then
Delete TempPath() + "OUTFILE.$$$"
Endif
FOpen 1, TempPath() + "OUTFILE.$$$", 1, 0
FPutLn 1, "@X0ECallsign data from the SAM Database by SamCall " + TSTRING004(2) + "@X07"
FPutLn 1, "@X0E" + STRING003 + "@X07"
FPutLn 1, " "
FPutLn 1, "@X0B" + STRING001
FPutLn 1, " "
FPutLn 1, STRING010
FPutLn 1, " "
:LABEL001
If (AnsiOn()) Then
Cls
AnsiPos 40 - Len(TSTRING005(1)) / 2, 2
Color 14
PrintLn TSTRING005(1)
AnsiPos 40 - Len(TSTRING005(2)) / 2, 3
Color 7
PrintLn TSTRING005(2)
AnsiPos 40 - Len(TSTRING005(3)) / 2, 4
Color 11
PrintLn TSTRING005(3)
AnsiPos 40 - Len(STRING003) / 2, 6
Color 15
PrintLn STRING003
AnsiPos 5, 8
Color 30
PrintLn " ╔═══════════════════════════════════════════════════════════════════╗ "
For INTEGER001 = 1 To 7
AnsiPos 5, 8 + INTEGER001
Color 30
Print " ║ ║ "
Color 127
PrintLn " "
Next
AnsiPos 5, 16
Color 30
Print " ╚═══════════════════════════════════════════════════════════════════╝ "
Color 127
PrintLn " "
AnsiPos 7, 17
Color 127
PrintLn TSTRING004(1)
Color 11
AnsiPos 40 - Len(STRING001) / 2, 19
PrintLn STRING001
PrintLn " "
Else
PrintLn " "
PrintLn TSTRING005(1)
PrintLn TSTRING005(2)
PrintLn TSTRING005(3)
PrintLn STRING003
PrintLn TSTRING004(2)
PrintLn STRING001
PrintLn " "
Endif
:LABEL002
If (BOOLEAN001) Goto LABEL007
BOOLEAN001 = 0
While (STRING009 <> "") Do
STRING009 = Inkey()
EndWhile
If (AnsiOn()) Then
AnsiPos 1, 22
InputText STRING007, STRING002, 15, 6
Else
PrintLn " "
InputStr STRING007, STRING002, 15, 6, Mask_Num() + Mask_Alpha(), 8
Endif
If (STRING002 == "") Then
BOOLEAN001 = 1
Endif
STRING002 = Upper(STRING002)
If (((((STRING002 == "?") || (STRING002 == "H")) || (STRING002 == "HE")) || (STRING002 == "HEL")) || (STRING002 == "HELP")) Then
STRING002 = ""
Cls
DispFile HelpPath() + "SAMCALL", 0
Wait
Goto LABEL001
Endif
If (STRING002 == "G") Then
FClose 1
FClose 2
If (Exist(TempPath() + "OUTFILE.$$$")) Then
Delete TempPath() + "OUTFILE.$$$"
Endif
If (Exist(PPEPath() + "FOUND.$$$")) Then
Delete PPEPath() + "FOUND.$$$"
Endif
Bye
Endif
If (STRING002 == "M") Then
STRING002 = ""
BOOLEAN001 = 1
If (BOOLEAN002) Then
PrintLn
PrintLn
PrintLn "@X0ECreating a private message to " + U_Name() + "@X07"
FClose 1
Message 0, U_Name(), "SamCall", "Calls from Sam Data Base", "R", Date(), 0, 0, TempPath() + "OUTFILE.$$$"
Goto LABEL003
Endif
PrintLn
PrintLn
PrintLn Chr(7) + "@X0CNo Callsign data to save.@X07"
PrintLn
Wait
Endif
:LABEL003
If (BOOLEAN001) Goto LABEL006
FClose 2
If (Exist(PPEPath() + "FOUND.$$$")) Then
Delete PPEPath() + "FOUND.$$$"
Endif
STRING009 = PPEPath() + "SCALL.EXE"
If (Exist(PPEPath() + "SCALL.EXE")) Then
If (FileInf(STRING009, 4) == 13216) Then
Shell 1, INTEGER001, PPEPath() + "SCALL.EXE ", STRING002 + " > " + PPEPath() + "FOUND.$$$"
Else
Cls
AnsiPos 1, 10
PrintLn "Please notify the Sysop..."
PrintLn "The version of SCALL.EXE in " + PPEPath()
PrintLn "is not the version distributed with SamCall."
AnsiPos 1, 16
Wait
Stop
Endif
Else
Cls
AnsiPos 1, 10
PrintLn "Please notify the Sysop..."
PrintLn "Unable to locate SCALL.EXE file in " + PPEPath()
AnsiPos 1, 15
Wait
Stop
Endif
If (Exist(PPEPath() + "FOUND.$$$")) Then
FOpen 2, PPEPath() + "FOUND.$$$", 0, 0
INTEGER001 = 1
While (INTEGER001 < 13) Do
FGet 2, TSTRING008(INTEGER001)
Inc INTEGER001
EndWhile
FClose 2
Else
Cls
AnsiPos 1, 6
PrintLn "Please notify the Sysop..."
PrintLn "Unable to locate data file " + Chr(34) + "FOUND.$$$" + Chr(34) + " in " + PPEPath()
PrintLn "This file should have been created by SCALL.EXE, Samcall was"
PrintLn "unable to locate the data necessary to continue."
PrintLn "SAMAPI.EXE may not be installed correctly."
AnsiPos 1, 15
Wait
Stop
Endif
If (AnsiOn()) Then
AnsiPos 40 - Len(TSTRING005(1)) / 2, 2
Color 14
SPrintLn TSTRING005(1)
AnsiPos 40 - Len(TSTRING005(2)) / 2, 3
Color 7
SPrintLn TSTRING005(2)
AnsiPos 40 - Len(TSTRING005(3)) / 2, 4
Color 11
SPrintLn TSTRING005(3)
AnsiPos 40 - Len(STRING003) / 2, 6
Color 15
SPrintLn STRING003
AnsiPos 5, 8
Color 30
SPrintLn " ╔═══════════════════════════════════════════════════════════════════╗ "
For INTEGER001 = 1 To 7
AnsiPos 5, 8 + INTEGER001
Color 30
SPrint " ║ ║ "
Color 127
SPrintLn " "
Next
AnsiPos 5, 16
Color 30
SPrint " ╚═══════════════════════════════════════════════════════════════════╝ "
Color 127
SPrintLn " "
AnsiPos 7, 17
Color 127
SPrintLn TSTRING004(1)
Color 11
AnsiPos 40 - Len(STRING001) / 2, 19
SPrintLn STRING001
SPrintLn " "
Else
PrintLn ""
Endif
If (InStr(TSTRING008(1), "No data for")) Then
If (AnsiOn()) Then
AnsiPos 9, 10
Print "@X1F*** Call ", STRING002, " Not Found.", Space(45 - Len(STRING002))
AnsiPos 9, 11
Print "@X1F", Space(64)
AnsiPos 9, 12
Print "@X1F", Space(64)
AnsiPos 9, 13
Print "@X1F", Space(64)
AnsiPos 9, 14
Print "@X1F", Space(64)
Else
Newline
PrintLn "*** Call ", STRING002, " Not Found."
Endif
Else
BOOLEAN002 = 1
BOOLEAN003 = 1
For INTEGER001 = 1 To 12
TSTRING008(INTEGER001) = TSTRING008(INTEGER001) + Space(80)
Next
If (Left(TSTRING008(5), 6) == "Class:") Then
STRING009 = Mid(TSTRING008(5), 8, 1)
If (STRING009 == "E") Then
TSTRING008(5) = "Class : Extra"
Goto LABEL004
Endif
If (STRING009 == "A") Then
TSTRING008(5) = "Class : Advanced"
Goto LABEL004
Endif
If (STRING009 == "G") Then
TSTRING008(5) = "Class : General"
Goto LABEL004
Endif
If (STRING009 == "T") Then
TSTRING008(5) = "Class : Technician"
Goto LABEL004
Endif
If (STRING009 == "N") Then
TSTRING008(5) = "Class : Novice"
Goto LABEL004
Endif
If (STRING009 == "C") Then
TSTRING008(5) = "Class : Club Call"
Goto LABEL004
Endif
If (STRING009 == "M") Then
TSTRING008(5) = "Class : Military"
Endif
Endif
:LABEL004
If (Left(TSTRING008(11), 7) == "County:") Then
TSTRING008(11) = "County : " + Mid(TSTRING008(11), 9, 20)
Endif
If (Len(Trim(TSTRING008(7), " ")) > 4) Then
If (Left(TSTRING008(6), 8) <> "Birthday") Then
INTEGER001 = S2I(Mid(TSTRING008(7), 12, 4) + 5, 10)
If (INTEGER001 > S2I(Mid(Date(), 7, 2), 10)) Then
INTEGER001 = S2I(Left(Year(Date()), 2), 10) - 1
Goto LABEL005
Endif
INTEGER001 = S2I(Left(Year(Date()), 2), 10)
:LABEL005
TSTRING008(6) = "YearBorn: " + I2S(INTEGER001, 10) + Mid(TSTRING008(7), 12, 4)
Endif
Endif
TSTRING006(1) = Left(Left(TSTRING008(1) + Space(40), 40) + TSTRING008(6), 64)
TSTRING006(2) = Left(Left(TSTRING008(2) + Space(40), 40) + TSTRING008(8), 64)
TSTRING006(3) = Left(Left(TSTRING008(3) + Space(40), 40) + TSTRING008(9), 64)
TSTRING006(4) = Left(Left(TSTRING008(4) + Space(40), 40) + TSTRING008(11), 64)
TSTRING006(5) = Left(Left(TSTRING008(12) + Space(40), 40) + TSTRING008(5), 64)
If (AnsiOn()) Then
AnsiPos 9, 10
Print "@X1F", TSTRING006(1)
AnsiPos 9, 11
Print "@X1F", TSTRING006(2)
AnsiPos 9, 12
Print "@X1F", TSTRING006(3)
AnsiPos 9, 13
Print "@X1F", TSTRING006(4)
AnsiPos 9, 14
Print "@X1F", TSTRING006(5)
Else
Newline
PrintLn TSTRING006(1)
PrintLn TSTRING006(2)
PrintLn TSTRING006(3)
PrintLn TSTRING006(4)
PrintLn TSTRING006(5)
Newline
Endif
Endif
If (BOOLEAN003) Then
For INTEGER001 = 1 To 5
FPutLn 1, " " + TSTRING006(INTEGER001)
Next
FPutLn 1, " "
FPutLn 1, STRING010
FPutLn 1, " "
BOOLEAN003 = 0
Endif
STRING002 = " "
For INTEGER001 = 1 To 9
TSTRING006(INTEGER001) = ""
Next
:LABEL006
Goto LABEL002
:LABEL007
FClose 1
FClose 2
If (Exist(TempPath() + "OUTFILE.$$$")) Then
Delete TempPath() + "OUTFILE.$$$"
Endif
If (Exist(PPEPath() + "FOUND.$$$")) Then
Delete PPEPath() + "FOUND.$$$"
Endif
Stop
;------------------------------------------------------------------------------
;
; Usage report (before postprocessing)
;
; ■ Statements used :
;
; 6 Cls
; 6 Wait
; 22 Color
; 76 Goto
; 69 Let
; 12 Print
; 45 PrintLn
; 46 If
; 1 DispFile
; 2 FOpen
; 7 FClose
; 1 FGet
; 11 FPutLn
; 6 Delete
; 1 InputStr
; 1 Inc
; 3 Newline
; 1 Shell
; 5 Stop
; 1 InputText
; 1 Bye
; 37 AnsiPos
; 1 Message
; 2 SPrint
; 10 SPrintLn
;
;
; ■ Functions used :
;
; 1 *
; 10 /
; 144 +
; 12 -
; 19 ==
; 2 <>
; 7 <
; 6 <=
; 2 >
; 12 >=
; 46 !
; 12 &&
; 10 ||
; 14 Len(
; 1 Upper()
; 8 Mid()
; 16 Left()
; 11 Space()
; 72 Chr()
; 4 Asc()
; 1 InStr()
; 6 Trim()
; 5 Date()
; 2 U_Name()
; 3 Year()
; 1 Inkey()
; 1 Mask_Alpha()
; 1 Mask_Num()
; 22 PPEPath()
; 5 ReadLine()
; 9 Exist()
; 1 I2S()
; 5 S2I()
; 5 AnsiOn()
; 1 And()
; 2 XOr()
; 4 Abs()
; 1 FileInf()
; 1 HelpPath()
; 8 TempPath()
;
;------------------------------------------------------------------------------
;
; Analysis flags : S
;
; S - Shell to DOS ■ 5
; This may be normal if the PPE need to execute an external command,
; but may be actually anything... nasty (formating HD, rebooting,...)
; or usefull (sorting, maintenance,...). Check!
; ■ Search for : SHELL
;
;------------------------------------------------------------------------------
;
; Postprocessing report
;
; 6 For/Next
; 2 While/EndWhile
; 36 If/Then or If/Then/Else
; 0 Select Case
;
;------------------------------------------------------------------------------
; AEGiS Corp - Break the routines, code against the machines!
;------------------------------------------------------------------------------